import React from 'react';
import './App.css';
import {CozeWorkflow} from './comments/CozeWorkflow'

function App() {
    const [version, setVersion] = React.useState(1)
    return (
        <div className="App">
            <CozeWorkflow Save={(version, x, y, scale, items, lines) => {
                console.log("saving", version, x, y, scale, items, lines)
                setVersion(version)
            }} width={'100vw'} height={'100vh'} version={version} title={"aaa"} nodes={[
                {
                    id: "1",
                    title: "测试01",
                    description: "编写代码，处理输入变量来生成返回值",
                    item: {
                        id: "1",
                        title: "测试01",
                        description: "编写代码，处理输入变量来生成返回值",
                        x: 10,
                        y: 10,
                        width: 484,
                        inCount: 1,
                        outCount: 1,
                        inputs: [
                            {
                                name: "input",
                                type: "string",
                                desc: "这是返回字段描述",
                                value: "hello"
                            }
                        ],
                        outputs: [
                            {
                                name: "output",
                                type: "string",
                                desc: "这是返回字段描述",
                                value: "hello"
                            }
                        ],
                        editable: false,
                    }
                },

            ]} description={"description"}/>
        </div>
    );
}

export default App;
